package asjava.uniobjects;

/**
 *
 * @author msowders
 */
public class UniCommandStub extends UniCommand {
    private String command;
    private boolean successful = true;

    public UniCommandStub() throws UniCommandException{
        if(!this.successful) throw new UniCommandException("Expected", 1);
    }
    public UniCommandStub(UniSession param) throws UniCommandException{
        super(param);
    }
    @Override
    public void cancel() throws UniCommandException {
        if(!this.successful) throw new UniCommandException("Expected", 1);
    }

    @Override
    public void exec() throws UniCommandException {
        if(!this.successful) throw new UniCommandException("Expected", 1);
    }

    @Override
    public int getAtSelected() {
        return 1;
    }

    @Override
    public int getBlockSize() {
        return 1;
    }

    @Override
    public String getCommand() {
        return "";
    }

    @Override
    public int status() {
        return 1;
    }

    @Override
    public int getSystemReturnCode() {
        return 1;
    }

    @Override
    public void nextBlock() throws UniCommandException {
        if(!this.successful) throw new UniCommandException("Expected", 1);
    }

    @Override
    public void reply(String paramString) throws UniCommandException {
        if(!this.successful) throw new UniCommandException("Expected", 1);
    }

    @Override
    public String response() {
        return "";
    }

    @Override
    public void setBlockSize(int paramInt) {
    }

    @Override
    public void setCommand(String paramString) {
        this.command = paramString;
    }
    
    public void setSuccessful(boolean successful){
        this.successful = successful;
    }
}
